<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css"
	href="<c:url value="/css/themes/default/easyui.css"/>">
<link rel="stylesheet" type="text/css"
	href="<c:url value="/css/themes/icon.css"/>">
<script type="text/javascript" src="<c:url value="/js/jquery.min.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/js/jquery.easyui.min.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/js/easyui-lang-zh_CN.js"/>"></script>
<title>就诊管理</title>
</head>
<body>
<Style>
#seedouctor_btn1{
width:100%;
margin-left:30px;
margin-top:50px;
}
#seedouctor_btn2{
width:100%;
margin-left:30px;
margin-top:155px;
}
#butcss1,#butcss2,#butcss3,#butcss4,#arrow,#butcss5,#butcss6{
background:url(css/themes/jl_style/jl_call.png);
width:100px;
height:50px;
background-size:100px 50px;
background-repeat:no-repeat;
border-top-left-radius:25px;
border-top-right-radius:5px;
border-bottom-right-radius:25px;
border-bottom-left-radius:5px;
float:left;
margin-left:10px;
}
#butcss2{
background:url(css/themes/jl_style/jl_casa.png);
background-size:100px 50px;
}
#butcss3{
background:url(css/themes/jl_style/jl_chack.png);
background-size:100px 50px;
}
#butcss4{
background:url(css/themes/jl_style/jl_print.png);
background-size:100px 50px;
}
#butcss5{
background:url(css/themes/jl_style/zhuyuan.png);
background-size:100px 50px;
}
#butcss6{
background:url(css/themes/jl_style/baiban.png);
background-size:100px 50px;
}
#arrow{
width:30px;
height:80px;
}
</Style>
	<script type="text/javascript">	 
	
	$("#Sq_hospital").linkbutton({		
		onClick:function(){
			var date = new Date();		
				var y = date.getFullYear();  
				var m = date.getMonth() + 1;  
				m = m < 10 ? '0' + m : m;  
				var d = date.getDate();  
				d = d < 10 ? ('0' + d) : d;  
				var needDate=y + '-' + m + '-' + d;			
				var a_yhic=$("#a_yhic").textbox("getText");
				var b_ygid=$("#b_ygid").textbox("getText");
				var c_kcid=$("#c_kcid").textbox("getText");
				if(a_yhic=="" || a_yhic==null){
						$.messager.alert("温馨提示","申请住院前请呼叫用户！")
				}else{										
			 $.ajax({
	                type: "Post",
	                url: "to_icnumtoic",
	                data: {icnum:a_yhic},
	                success: function (data) {
	                	$.messager.confirm("确认", "是否确定给病人"+data.iName+"申请住院", function (r) {  
		       				 if (r) {								       							       					
		       						$.ajax({
		       			                type: "Post",
		       			                url: "to_icnumtoic",
		       			                data: {icnum:a_yhic},  
		       			                success: function (data) {                	                             	
		       			                    $.ajax({
		       			                        type: "Post",
		       			                        url: "to_Hospapply",
		       			                        data:{adate:needDate,
		       			                        	   haname:data.iName,
		       			                        	   hpsex:data.iSex,
		       			                        	   hpremarks:"未完成",
		       			                        	   hpofficeid:c_kcid,
		       			                        	   hmedicalid:a_yhic,
		       			                        	   hdoctorid: b_ygid
		       			                        	},
		       			                        success: function (data) {
		       			                        	$.messager.alert("温馨提示","申请已经成功！")
		       			                        }
		       			                    });
		       			                }
		       			            });		       							   
		       				 }else{
		       					$.messager.alert("温馨提示","申请已取消")      				 
		               		 }
	         			});																		
	                }
			});
			}
		}
	});
	
	$("#seedoctor_case").linkbutton({
		onClick:function(){
			$('#seedouctorWin').window({'title': "病例管理"});
			$("#seedouctorWin").window('open');
		}
	});
	$("#seedoctor_call").linkbutton({
		onClick:function(){			
			$('#seeCallWin').window({'title': "呼叫管理"});
			$("#seeCallWin").window('open');
			var pd=$("#a_yhic").textbox("getText");
			if(pd==""||pd==null){
				$("#call_stop").linkbutton("disable");
				$("#call_forward").linkbutton("disable");
				$("#call_next").linkbutton("disable");				
			}else{
				$.ajax({
	                type: "Post",
	                url: "to_findbyname",
	                data: {iId:pd},
	                success: function (data) {
	                    $("#call_info").textbox("setText","当前就诊病人是："+data);
	                }
	            });
			}
		}
	});
	$("#seedoctor_ExamineApply").linkbutton({
		onClick:function(){
			$('#seedExamineApplyWin').window({'title': "申请检查化验管理"});
			$("#seedExamineApplyWin").window('open');
		}
	});
	$("#seedoctor_ElectronicePrint").linkbutton({
		onClick:function(){
			var a_yhic=$("#a_yhic").textbox("getText");
			if(a_yhic==null || a_yhic==""){
				$.messager.alert("温馨提示","开药前请呼叫病人！")
			}else{
				$('#seeElectronicePrintWin').window({'title': "电子处方管理"});
				$("#seeElectronicePrintWin").window('open');
			}
			
		}
	});	
	
	</script> 
	
	<div style="display:none;">
	<input id="a_yhic"   class="easyui-textbox">
	<input id="b_ygid"   class="easyui-textbox">
	<input id="c_kcid"   class="easyui-textbox">
	<input id="c_ynYz"   class="easyui-textbox">
	<input id="c_chid"   class="easyui-textbox">
	</div>
	<div id="seedouctor_btn1">
		<div id="butcss1" >
			<a id="seedoctor_call"  class="easyui-linkbutton"
					data-options="iconCls:'icon-add',width:100,height:50,plain:true">呼叫系统</a> 
			<p style="margin-left:25px;margin-top:0px">呼叫系统</p>
		</div>
		<div id="arrow"><img src ="css/themes/jl_style/right.png" height="50" width="30"/></div>		
		<div id="butcss3">
			<a id="seedoctor_ExamineApply" class="easyui-linkbutton"
					data-options="iconCls:'icon-add',width:100,height:50,plain:true">检化申请</a>
			<p style="margin-left:25px;margin-top:0px">检化申请</p> 
		</div>
		<div id="arrow"><img src ="css/themes/jl_style/right.png" height="50" width="30"/></div>
		<div id="butcss4">
			<a id="seedoctor_ElectronicePrint" class="easyui-linkbutton"
					data-options="iconCls:'icon-add',width:100,height:50,plain:true">电子处方</a>
			<p style="margin-left:25px;margin-top:0px">电子处方</p>
		</div>
		<div id="arrow"><img src ="css/themes/jl_style/right.png" height="50" width="30"/></div>
		<div id="butcss5">
			<a id="Sq_hospital" class="easyui-linkbutton"
					data-options="iconCls:'icon-add',width:100,height:50,plain:true">住院申请</a>
			<p style="margin-left:25px;margin-top:0px">住院申请</p>
		</div>	
	</div>
	<div id="seedouctor_btn2">
		<div id="butcss6">
			<a id="iccarddel" class="easyui-linkbutton"
					data-options="iconCls:'icon-add',width:100,height:50,plain:true">排班查询</a>
			<p style="margin-left:25px;margin-top:0px">排班查询</p>
		</div>
		<div id="arrow"><img src ="css/themes/jl_style/right.png" height="50" width="30"/></div>
	</div>
        <div id="seedouctorWin" class="easyui-window" style="padding: 10px; line-height: 150%;" data-options="
			width: 800,
			height: 500,
			href: 'tojl_diagnose_case',
			closed: true
		">			
		</div>
		<div id="seeCallWin" class="easyui-window" style="padding: 10px; line-height: 150%;" data-options="
			width: 235,
			height: 320,
			href: 'tojl_call',
			closed: true
		">			
		</div>
		<div id="seedExamineApplyWin" class="easyui-window" style="padding: 10px; line-height: 150%;" data-options="
			width: 800,
			height: 500,
			href: 'tojl_JlExamineApply',
			closed: true
		">			
		</div>
		<div id="seeElectronicePrintWin" class="easyui-window" style="padding: 10px; line-height: 150%;" data-options="
			width: 800,
			height: 500,
			href: 'tojl_JlElectronicePrint',
			closed: true
		">			
		</div>
		<div id="seechid" class="easyui-window" style="padding: 10px; line-height: 150%;" data-options="
			width: 600,
			height: 300,
			href: '',
			closed: true
		">			
		</div>
</body>
</html>